package org.zsl.ioc.app.spring.app;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.zsl.ioc.app.spring.model.Role;

public class Client2 {

    public static void main(String[] args) {

        ApplicationContext context =
                new ClassPathXmlApplicationContext("classpath:spring2.xml");

        Role role1 = (Role) context.getBean("role");
        Role role2 = (Role) context.getBean("role");


        System.out.println(role1==role2);



    }
}
